var processBar = function(basePath){
	if(this.instance != null) return;
	var processDiv = '<div id="processMask" style="position:absolute;left:0;top:0;width:100%;height:100%;z-index:20000;background-color:white;"></div>' +
					 '<div id="process" style="position:absolute;left:45%;top:40%;padding:2px;z-index:20001;height:auto;">' +
    					'<div style="background:white;color:#444;font:bold 13px tahoma,arial,helvetica;padding:10px;margin:0;height:auto;"><img src="' + basePath + 'images/processanima.gif" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;color:#225588;"/>Design Zone<br /><span id="processMsg" style="font: normal 10px arial,tahoma,sans-serif;"></span></div>' +
					 '</div>';
	document.write(processDiv);
	this.instance = document.getElementById('process');
	this.processMsg = document.getElementById('processMsg');
	this.processMask = document.getElementById('processMask');
	this.updateMsg('Loading page......');
}

processBar.prototype = {
	instance: null,
	
	processMsg: null,
	
	processMask: null,
	
	show: function(){
		this.instance.style.display = '';
	},
	
	hide: function(){
		this.instance.style.display = 'none';
		if(Ext){
			setTimeout(function(){
		        Ext.get('processMask').fadeOut({remove:false});
		    }, 250);
		}else{
			this.processMask.style.display = '';
		}
	},
	
	updateMsg: function(msg){
		this.processMsg.innerHTML = msg;
	}
}

